<fieldset>
  <legend>Flowdock</legend>
  <p class=></p>

  <%
    stage = form.object
    stage.flowdock_flows.build if stage.flowdock_flows.last&.new_record?
  %>

  <p class="col-lg-offset-2">
    Name and API token of the Flowdock flow which should be notified of deploys.
  </p>

  <%= form.fields_for_many :flowdock_flows do |flow_field| %>
    <div class="col-lg-2 col-lg-offset-2">
      <%= flow_field.text_field :name, class: "form-control", placeholder: "Flow name" %>
    </div>
    <div class="col-lg-4">
      <%= flow_field.text_field :token, class: "form-control", placeholder: "Token" %>
    </div>
  <% end %>
</fieldset>
